

<%
if(table_name.toLowerCase().indexOf("select")!=-1)
{
	strsql=table_name;
}else
	{
	strsql="select * from "+table_name+" where "+col_id+"="+jsp.r(col_id)+"";
}
%>
<table>
	<tr><td>
	
	<%
	if(jsp.r("method").equals("insert")){
	%>
	<img src="/images/bt1.gif" style="cursor:hand" onclick="javascript:doinsert();" >
	<%
	}
	if(jsp.r("method").equals("update")){
	%>
	<img src="/images/bt6.gif" style="cursor:hand" onclick="javascript:doupdate();"  >
	
	<%
	}
	if(jsp.r("method").equals("delete")){
	%>
	<img src="/images/bt5.gif" style="cursor:hand" onclick="javascript:dodelete();">
	<%
	}
	
	if(jsp.r("method").equals("select")){
	%>
	<img src="/images/bt9.gif" style="cursor:hand"  onclick="javascript:window.opener=null;window.close();" >
</td><td></td></tr></table>
	<%
	}
	if(jsp.r("method").equals("delete")||jsp.r("method").equals("select")||jsp.r("method").equals("update"))
	{
	rs=handle.executeQuery(strsql);
	if(rs.next())
	{
		for(int i=0;i<col_show.length;i++)
		jsp.setValue(col_show[i],rs.getString(col_show[i]));	
	}
	}
	%>
</div>

<script language=javascript>
	function doinsert()
	{
		document.all.gs_form.submit();
	}
	function doupdate()
	{
		document.all.gs_form.submit();
	}
	function dodelete()
	{
		document.all.gs_form.submit();
	}
	</script>
